/*************************************************************************
	> File Name: oj-572.cpp
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2021年02月03日 星期三 07时52分48秒
 ************************************************************************/
#include <iostream>
#include <cstdio>
#include <queue>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
#define MAX_N 400000
ll n; 

int main() {
    scanf("%lld", &n);
    vector<ll> a(n), b(n), ans(n);
    priority_queue<ll> q;
    for (int i = 0; i < n; ++i) {
        scanf("%lld", &a[i]);
    }
    for (int i = 0; i < n; ++i) {
        scanf("%lld", &b[i]);
        q.push(a[0] + b[i]);
    }
    for (int i = 1; i < n; ++i) {
        for (int j = 0; j < n - i; ++j) {
            ll sum = a[i] + b[j];
            if (sum < q.top()) {
                q.pop();
                q.push(sum);
            } else {
                break;
            }
        }
    }
    for (int i = 0; i < n; ++i) {
        ans[n - 1 - i] = q.top();
        q.pop();
    }
    for (int i = 0; i < n; ++i) {
        printf("%lld\n", ans[i]);
    }
    return 0;
}
